<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../style.css" type="text/css" media="screen">
<link rel="stylesheet" href="../print.css" type="text/css" media="print">
<meta content="Collections,asds.Collections,bubbleSort,copy,frequency,heapSort,insertLinkedSort,insertSort,quickSort,selectSort" name="keywords">
<title>asds.Collections</title>
</head>
<body>
<script type="text/javascript" language="javascript" src="../asdoc.js"></script><script type="text/javascript" language="javascript" src="../cookies.js"></script><script type="text/javascript" language="javascript">
<!--
				asdocTitle = 'Collections - Asds';
				var baseRef = '../';
				window.onload = configPage;
			--></script>
<table style="display:none" id="titleTable" cellspacing="0" cellpadding="0" class="titleTable">
<tr>
<td align="left" class="titleTableTitle">2009-2010 1.0.1</td><td align="right" class="titleTableTopNav"><a onclick="loadClassListFrame('../all-classes.html')" href="../package-summary.html">All&nbsp;Packages</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../all-classes.html')" href="../class-summary.html">All&nbsp;Classes</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../index-list.html')" href="../all-index-A.html">Index</a>&nbsp;|&nbsp;<a href="../index.html?asds/Collections.html&amp;asds/class-list.html" id="framesLink1">Frames</a><a onclick="parent.location=document.location" href="" style="display:none" id="noFramesLink1">No&nbsp;Frames</a></td><td rowspan="3" align="right" class="titleTableLogo"><img alt="Adobe Logo" title="Adobe Logo" class="logoImage" src="../images/logo.jpg"></td>
</tr>
<tr class="titleTableRow2">
<td align="left" id="subTitle" class="titleTableSubTitle">Class&nbsp;Collections</td><td align="right" id="subNav" class="titleTableSubNav"><a href="#methodSummary">Methods</a></td>
</tr>
<tr class="titleTableRow3">
<td colspan="2">&nbsp;</td>
</tr>
</table>
<script type="text/javascript" language="javascript">
<!--
if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("Class Collections"); titleBar_setSubNav(false,false,false,false,false,false,true,false,false,false,false,false,false,false);}
--></script>
<div class="MainContent">
<table cellspacing="0" cellpadding="0" class="classHeaderTable">
<tr>
<td class="classHeaderTableLabel">Package</td><td><a onclick="javascript:loadClassListFrame('class-list.html')" href="package-detail.html">asds</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Class</td><td class="classSignature">public class Collections</td>
</tr>
</table>
<p></p>
  各种对集合和数组操作的方法。
  其中包括各种排序算法。
  <p></p>
<br>
<hr>
</div>
<a name="methodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Methods</div>
<table id="summaryTableMethod" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#Collections()">Collections</a>()</div>
<div class="summaryTableDescription"></div>
</td><td class="summaryTableOwnerCol">Collections</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#bubbleSort()">bubbleSort</a>(array:Array, compareFun:Function = null):void</div>
<div class="summaryTableDescription">[static]
   冒泡排序的实现。 </br>
   冒泡排序算法速度非常慢，但是算法实现非常简单。
   <li>算法将对原始数组做修改</li>
   </div>
</td><td class="summaryTableOwnerCol">Collections</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#copy()">copy</a>(c:<a href="IList.html">IList</a>, l:<a href="IList.html">IList</a>):void</div>
<div class="summaryTableDescription">[static]
   将所有元素从一个列表复制到另一个列表。 
   </div>
</td><td class="summaryTableOwnerCol">Collections</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#frequency()">frequency</a>(c:<a href="ICollection.html">ICollection</a>, o:*):int</div>
<div class="summaryTableDescription">[static]
   返回指定 collection 中等于指定对象的元素数。  
   </div>
</td><td class="summaryTableOwnerCol">Collections</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#heapSort()">heapSort</a>(array:Array, compareFun:Function = null):void</div>
<div class="summaryTableDescription">[static]
   堆排序实现。</br>
    <li>算法将对原始数组做修改</li>
   </div>
</td><td class="summaryTableOwnerCol">Collections</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#insertLinkedSort()">insertLinkedSort</a>(array:Array, compareFun:Function = null):<a href="list/LinkedList.html">LinkedList</a>
</div>
<div class="summaryTableDescription">[static]
   基于链表的插入排序实现。</br>
   由于对速度的提升，此算法才用LinkedList来实现,如果最终数据需要数组，可以采用LinkedList.toArray()方法获取。</br>
   理论基于链表的实现会更快(因为链表插入速度快)，但实际并非如此。原因是排序过程中需要不断创建节点，创建节点实例的过程非常耗时.</div>
</td><td class="summaryTableOwnerCol">Collections</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#insertSort()">insertSort</a>(array:Array, compareFun:Function = null):void</div>
<div class="summaryTableDescription">[static]
   插入排序实现。</br>
   与冒泡和择选相比，插入排序排序更加的优秀.一般比冒泡要快一倍，比选择排序也要快。
   <li>算法将对原始数组做修改</li>
   </div>
</td><td class="summaryTableOwnerCol">Collections</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#quickSort()">quickSort</a>(array:Array, compareFun:Function = null):void</div>
<div class="summaryTableDescription">[static]
   快速排序实现。</br>
   快速排序是以上所有排序中最快的,所以也是最流行的。
    <li>算法将对原始数组做修改</li>
   </div>
</td><td class="summaryTableOwnerCol">Collections</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#selectSort()">selectSort</a>(array:Array, compareFun:Function = null):void</div>
<div class="summaryTableDescription">[static]
   择选排序实现。</br>
   择选排序改进了冒泡排序.</div>
</td><td class="summaryTableOwnerCol">Collections</td>
</tr>
</table>
</div>
<script type="text/javascript" language="javascript">
<!--
showHideInherited();
--></script>
<div class="MainContent">
<a name="constructorDetail"></a>
<div class="detailSectionHeader">Constructor detail</div>
<a name="Collections()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">Collections</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">constructor</td>
</tr>
</table>
<div class="detailBody">
<code>public function Collections()</code>
</div>
<a name="methodDetail"></a>
<div class="detailSectionHeader">Method detail</div>
<a name="bubbleSort()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">bubbleSort</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td>
</tr>
</table>
<div class="detailBody">
<code>public static function bubbleSort(array:Array, compareFun:Function = null):void</code><p>
   冒泡排序的实现。 </br>
   冒泡排序算法速度非常慢，但是算法实现非常简单。
   <li>算法将对原始数组做修改</li>
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">array</span>:Array</code> &mdash; 须排序的数据。
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">compareFun</span>:Function</code> (default = <code>null</code>)<code></code> &mdash; 比较函数，返回布尔值，接收2个参数据，如果参数为空则以默认比较(从小到大)。</br>如:compareFun=function(value1:value2::Boolean{return value1>value2;}。
   
   </td>
</tr>
</table>
</div>
<a name="copy()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">copy</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static function copy(c:<a href="IList.html">IList</a>, l:<a href="IList.html">IList</a>):void</code><p>
   将所有元素从一个列表复制到另一个列表。 
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">c</span>:<a href="IList.html">IList</a></code></td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">l</span>:<a href="IList.html">IList</a></code></td>
</tr>
</table>
</div>
<a name="frequency()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">frequency</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static function frequency(c:<a href="ICollection.html">ICollection</a>, o:*):int</code><p>
   返回指定 collection 中等于指定对象的元素数。  
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">c</span>:<a href="ICollection.html">ICollection</a></code></td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">o</span>:*</code></td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>int</code></td>
</tr>
</table>
</div>
<a name="heapSort()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">heapSort</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static function heapSort(array:Array, compareFun:Function = null):void</code><p>
   堆排序实现。</br>
    <li>算法将对原始数组做修改</li>
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">array</span>:Array</code> &mdash; 须排序的数据。
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">compareFun</span>:Function</code> (default = <code>null</code>)<code></code> &mdash; 比较函数，返回布尔值，接收2个参数据，如果参数为空则以默认比较(从小到大)。</br>如:compareFun=function(value1:value2::Boolean{return value1>value2;}。
   </td>
</tr>
</table>
<p>
<span class="label">See also</span>
</p>
<div class="seeAlso">
<a href="Heap.html" target="">Heap</a>
</div>
</div>
<a name="insertLinkedSort()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">insertLinkedSort</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static function insertLinkedSort(array:Array, compareFun:Function = null):<a href="list/LinkedList.html">LinkedList</a></code><p>
   基于链表的插入排序实现。</br>
   由于对速度的提升，此算法才用LinkedList来实现,如果最终数据需要数组，可以采用LinkedList.toArray()方法获取。</br>
   理论基于链表的实现会更快(因为链表插入速度快)，但实际并非如此。原因是排序过程中需要不断创建节点，创建节点实例的过程非常耗时.
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">array</span>:Array</code> &mdash; 须排序的数据。
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">compareFun</span>:Function</code> (default = <code>null</code>)<code></code> &mdash; 比较函数，返回布尔值，接收2个参数据，如果参数为空则以默认比较(从小到大)。</br>如:compareFun=function(value1:value2::Boolean{return value1>value2;}。
   </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code><a href="list/LinkedList.html">LinkedList</a></code></td>
</tr>
</table>
<p>
<span class="label">See also</span>
</p>
<div class="seeAlso">LinkedList</div>
</div>
<a name="insertSort()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">insertSort</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static function insertSort(array:Array, compareFun:Function = null):void</code><p>
   插入排序实现。</br>
   与冒泡和择选相比，插入排序排序更加的优秀.一般比冒泡要快一倍，比选择排序也要快。
   <li>算法将对原始数组做修改</li>
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">array</span>:Array</code> &mdash; 须排序的数据。
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">compareFun</span>:Function</code> (default = <code>null</code>)<code></code> &mdash; 比较函数，返回布尔值，接收2个参数据，如果参数为空则以默认比较(从小到大)。</br>如:compareFun=function(value1:value2::Boolean{return value1>value2;}。
   </td>
</tr>
</table>
</div>
<a name="quickSort()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">quickSort</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static function quickSort(array:Array, compareFun:Function = null):void</code><p>
   快速排序实现。</br>
   快速排序是以上所有排序中最快的,所以也是最流行的。
    <li>算法将对原始数组做修改</li>
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">array</span>:Array</code> &mdash; 须排序的数据。
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">compareFun</span>:Function</code> (default = <code>null</code>)<code></code> &mdash; 比较函数，返回布尔值，接收2个参数据，如果参数为空则以默认比较(从小到大)。</br>如:compareFun=function(value1:value2::Boolean{return value1>value2;}。
   </td>
</tr>
</table>
<p>
<span class="label">See also</span>
</p>
<div class="seeAlso">
<a href="Heap.html" target="">Heap</a>
</div>
</div>
<a name="selectSort()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">selectSort</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static function selectSort(array:Array, compareFun:Function = null):void</code><p>
   择选排序实现。</br>
   择选排序改进了冒泡排序.
   <li>算法将对原始数组做修改</li>
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">array</span>:Array</code> &mdash; 须排序的数据。
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">compareFun</span>:Function</code> (default = <code>null</code>)<code></code> &mdash; 比较函数，返回布尔值，接收2个参数据，如果参数为空则以默认比较(从小到大)。</br>如:compareFun=function(value1:value2::Boolean{return value1>value2;}。
   </td>
</tr>
</table>
</div>
<br>
<br>
<hr>
<br>
<p></p>
<center class="copyright"> 
</center>
</div>
</body>
</html>
<!-- -->
